package com.fosun.spr.plugin.uuc.api.uucCommonRemote.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.fosun.spr.core.base.CoBaseService;
import com.fosun.spr.plugin.uuc.api.uucCommonRemote.dao.UucCommonRemoteDao;
import com.fosun.spr.plugin.uuc.api.uucCommonRemote.service.UucCommonRemoteService;
import com.fosun.spr.plugin.uuc.api.uucCommonRemote.service.model.ListMenuSpModel;
import com.fosun.spr.plugin.uuc.api.uucCommonRemote.service.model.ListMenuSrModel;
import com.fosun.spr.plugin.uuc.api.uucCommonRemote.service.model.ListPrivilegeSpModel;
import com.fosun.spr.plugin.uuc.api.uucCommonRemote.service.model.ListPrivilegeSrModel;
import com.fosun.spr.plugin.uuc.api.uucCommonRemote.service.model.ListRoleSpModel;
import com.fosun.spr.plugin.uuc.api.uucCommonRemote.service.model.ListRoleSrModel;
import com.fosun.spr.plugin.uuc.api.uucCommonRemote.service.model.ListUserSpModel;
import com.fosun.spr.plugin.uuc.api.uucCommonRemote.service.model.ListUserSrModel;

@Transactional(rollbackFor = { RuntimeException.class, Exception.class })
@Service("uucCommonRemoteService")
public class UucCommonRemoteServiceImpl extends CoBaseService implements UucCommonRemoteService {
	@Autowired
	private UucCommonRemoteDao uucCommonRemoteDao;
	// @Resource
	// private UucCommonRemoteMapper uucCommonRemoteMapper;

	@Override
	public ListPrivilegeSrModel listPrivilege(ListPrivilegeSpModel spModel) {
		ListPrivilegeSrModel srModel = new ListPrivilegeSrModel();
		srModel.setDatas(uucCommonRemoteDao.listPrivilege(spModel));
		// srModel.setTotalCount(uucCommonRemoteDao.listPrivilegeCount(spModel));
		return srModel;
	}

	@Override
	public ListMenuSrModel listMenu(ListMenuSpModel spModel) {
		ListMenuSrModel srModel = new ListMenuSrModel();
		srModel.setDatas(uucCommonRemoteDao.listMenu(spModel));
		// srModel.setTotalCount(uucCommonRemoteDao.listMenuCount(spModel));
		return srModel;
	}

	@Override
	public ListUserSrModel listUser(ListUserSpModel spModel) {
		ListUserSrModel srModel = new ListUserSrModel();
		srModel.setDatas(uucCommonRemoteDao.listUser(spModel));
		//srModel.setTotalCount(uucCommonRemoteDao.listUserCount(spModel));
		return srModel;
	}

	@Override
	public ListRoleSrModel listRole(ListRoleSpModel spModel) {
		ListRoleSrModel srModel = new ListRoleSrModel();
		srModel.setDatas(uucCommonRemoteDao.listRole(spModel));
		//srModel.setTotalCount(uucCommonRemoteDao.listRoleCount(spModel));
		return srModel;
	}
}
